#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
	int n = 20;
	int count = 20;
	while (n >= 2)
	{
		n /= 2;
		count += n;
	}
	printf("%d", count);
	return 0;
}